package cn.didi.feidi.javabackend.server.waterdeliver.dto;

import cn.didi.feidi.javabackend.mysql.jpa.waterDeliver.WaterDeliver;
import cn.didi.feidi.javabackend.server.waterdeliver.utils.EntityUtil;

/**
 * Created by lindanpeng on 2017/7/16.
 */
public class RegisterDto {
    private String phoneNumber;
    private String password;
    private String verificationCode;
    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getVerificationCode() {
        return verificationCode;
    }

    public void setVerificationCode(String verificationCode) {
        this.verificationCode = verificationCode;
    }


    public WaterDeliver wrapToWaterDeliver(){
        WaterDeliver waterDeliver=new WaterDeliver();
        waterDeliver.setPhoneNumber(this.phoneNumber);
        waterDeliver.setPassword(this.password);
        waterDeliver.setWaterDeliverId(EntityUtil.generateId(waterDeliver));
        return waterDeliver;
    }
}
